<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:t="http://hotelmanager.com/tags"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:rich="http://java.sun.com/xml/ns/persistence/orm"
      xmlns:a4j="http://richfaces.org/a4j">

<head>
    <link href="#{facesContext.externalContext.requestContextPath}/ResourceFiles/css/style.css" rel="stylesheet"
          type="text/css"/>
</head>
<body>
<ui:composition template="/content/templates/main.xhtml">


    <ui:define name="header">
        <ui:include src="/content/templates/header.xhtml"/>
    </ui:define>
    <div id="content_container">
        <ui:define name="navigation">
            <ui:include src="/content/templates/navigation.xhtml"/>
        </ui:define>

        <ui:define name="content">
            <f:view>
                <h:form>
                    <t:ItemRowDetails Image="/ResourceFiles/rooms/blc.jpg" RoomNum="#{RoomDetails.room.room_id}"
                                      Rooms="#{RoomDetails.room.rooms_Qty}" Places="#{RoomDetails.room.places}"
                                      Style="#{RoomDetails.room.style_name}" Status="#{RoomDetails.room.status}"
                                      Status_Desc="#{FltReference.getRoomStatusFromRef(RoomDetails.room.status)}"
                                      Cost="#{RoomDetails.room.cost}"/>
                    <br/>
                    <div style="overflow:auto;height:95px;width:100%" align="center">
                        <table align="left" border="1" style="border-bottom-color:blue;">
                            <tbody>
                            <tr>
                                <a4j:repeat var="orderCalendarMonth" value="#{RoomDetails.orderCalendar}" binding="#{RoomDetails.repeatComp}">
                                    <ui:fragment rendered="#{RoomDetails.displayMonth(orderCalendarMonth.date)}">
                                        <td align="center" colspan="#{RoomDetails.colspan}">
                                            <h:outputLabel value="#{RoomDetails.getMonth(orderCalendarMonth.date,LocaleConf.getLocale())}"/>
                                        </td>
                                    </ui:fragment>
                                </a4j:repeat>
                            </tr>
                            <tr>
                                <a4j:repeat var="calendarDayOfWeek" value="#{RoomDetails.orderCalendar}">
                                    <td align="center" width="25">
                                        <h:outputLabel value="#{RoomDetails.getDayOfWeek(calendarDayOfWeek.date,LocaleConf.getLocale())}" styleClass="#{RoomDetails.isWeekEnd(calendarDayOfWeek.date) eq 'true' ? 'red' : ''}"/>
                                    </td>
                                </a4j:repeat>
                            </tr>
                            <tr>
                                <a4j:repeat var="calendarDay" value="#{RoomDetails.orderCalendar}">
                                    <td align="center" width="25">
                                        <h:outputLabel value="#{RoomDetails.getDayOfMonth(calendarDay.date)}" styleClass="#{calendarDay.status eq '2' ? 'red' : ''}#{calendarDay.status eq '1' ? 'yellow' : ''}"/>
                                    </td>
                                </a4j:repeat>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </h:form>
            </f:view>
        </ui:define>

        <ui:define name="panel">
            <ui:include src="/content/templates/panel.xhtml"/>
        </ui:define>

        <ui:define name="footer">
            <ui:include src="/content/templates/footer.xhtml"/>
        </ui:define>
    </div>

</ui:composition>
</body>
</html>